package com.jzo2o.customer.controller.open;

import com.jzo2o.customer.model.dto.request.RegisterAccountReqDTO;
import com.jzo2o.customer.service.RegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController("RegisterController")
@Api(tags = "机构注册账号接口")
public class RegisterController {
    @Resource
    private RegisterService registerService;

    @PostMapping("/open/serve-provider/institution/register")
    @ApiOperation("机构注册接口")
    public void Account(@RequestBody RegisterAccountReqDTO registerAccountReqDTO) {
        registerService.Account(registerAccountReqDTO);
    }

    @PostMapping("/agency/serve-provider/institution/resetPassword")
    @ApiOperation("忘记密码接口")
    public void ResetPassword(@RequestBody RegisterAccountReqDTO registerAccountReqDTO) {
        registerService.ResetPassword(registerAccountReqDTO);
    }
}
